<script src="/include/calendar/calendar.js"></script>
<div class="pageheader">
	<h2>
		<i class="fa fa-pencil-square"></i>日志管理
	</h2>
	<div class="breadcrumb-wrapper">
		<span class="label">你所在的位置：</span>
		<ol class="breadcrumb">
			<li><a href="/index">ERP管理系统</a></li>
			<li>日志管理</li>
			<li class="active">特殊库管日志</li>
		</ol>
	</div>
</div>
<div class="contentpanel">
<div class="main">
    <form id="search-form" class="form-inline" method="post" post="/log/special" style="margin-bottom: 10px;">
        <div class="form-group">
            <label for="date">日期:</label>
            <input class="form-control" type="text" name="starttime" onclick="new Calendar().show(this);" readonly="readonly" value="<?php echo $this->starttime;?>">
	               至<input class="form-control" type="text" name="endtime" onclick="new Calendar().show(this);" readonly="readonly" value="<?php echo $this->endtime;?>">
            <!-- 
                       状态:
            <select name="ischeck">
				<option value="" <?php if($this->ischeck===false):?> selected <?php endif;?>>请选择</option>
				<option value="0" <?php if($this->ischeck===0):?> selected <?php endif;?>>待审核</option>
				<option value="1" <?php if($this->ischeck==1):?> selected <?php endif;?>>已通过</option>
				<option value="2" <?php if($this->ischeck==2):?> selected <?php endif;?>>已否决</option>
			</select> 
             -->
        </div>
        <button type="submit" class="btn btn-primary">搜索</button>
    </form>
    <div class="table-responsive">
        <table class="table table-bordered table-hover">
            <thead>
                <tr>
                    <th>SKU</th>
                    <th>产品名称</th>
                    <th>订单号</th>
                    <th>尺码和数量</th>
                    <th>时间</th>
                    <th>事件原因</th>
                    <th>操作人</th>
                    <th>责任人</th>
                </tr>
            </thead>
            <tbody>      
                <?php if ($this->logList):?>
                <?php foreach ($this->logList as $v):?>
		        <tr>
		            <td><?php echo $v['sku'];?></td>
				    <td><?php echo $v['title'];?></td>
				    <td><?php echo $v['orderid'];?></td>
				    <td>
				    <?php
				    foreach ( json_decode ( $v ['info'], true ) as $_v ) {
				    	echo '尺码: ' . $_v ['size'] . ', 库存: ' . $_v ['value'] . '<br/>';
		            }
		            ?>
		            </td>
		            <td><?php echo $v['addtime']; ?></td>
				    <td><?php echo mb_substr($v['remark'],0,20,'utf-8')."..."; ?></td>
				    <td><?php echo $v['adduser']; ?></td>
				    <td><?php echo $v['dutyuser']; ?></td>
				</tr>
				<?php endforeach;?> 
				<?php endif;?>	     
			    <tr>
			        <td colspan="8">
			        <?php
					     echo $this->paginationControl ( $this->paginator, 'Sliding', 'page/pager.phtml', array (
						    'starttime' => $this->starttime,
						    'endtime' => $this->endtime 
				    	) );
				    ?>
			        </td>
			    </tr>
		    </tbody>
        </table>
    </div>
</div>
</div>
